<style type="text/css">
    .bjui-pageHeader{
        font-size: 18px;
        font-weight: bold;
    }
    .form{
        padding: 15px;
    }
    .form dl {
        overflow: hidden;
        padding-top: 15px;
    }

    .form dt {
        color: #666;
        float: left;
        font-size: 14px;
        padding: 3px 0 0;
        width: 15%;
    }
    .form dd {
        float: left;
        line-height: 22px;
    }
    dd.desc {
        height: 30px;
        padding: 0 10px;
        width: 150px;
    }
</style>
<script type="text/javascript">
    var editor = KindEditor.editor({
        fileManagerJson : '{:U("Attachment/filemanager")}'
    });
    $('#BrowerPicture').click(function() {
        editor.loadPlugin('filemanager', function() {
        editor.plugin.filemanagerDialog({
            viewType : 'VIEW',
            dirName : 'image',
            clickFn : function(url, title) {
                $('#litpic').val(url);
                editor.hideDialog();
                }
            });
        });
    });
</script>
<script type="text/javascript">
    function doc_upload_success(file, data) {
        var json = $.parseJSON(data)
        $(this).bjuiajax('ajaxDone', json)
        if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
            $('#litpic').val(json.filename)
        }
    }
</script>
<div class="bjui-pageContent">
    <div class="form">
        <form method='post' data-toggle="validate" action="{:U('Site/addHandle')}">
            <dl>
                <dt>网站名称：</dt>
                <dd>
                    <input type="text" name="title" size="30" data-rule="required" data-tip="请填写网站名称" data-ok="OK"/>
                </dd>
            </dl>
            <dl>
                <dt>网站地址：</dt>
                <dd>
                    <input type="text" name="url" size="30" value="http://" data-rule="required;url" data-tip="请填写网站地址" data-ok="OK"/>
                </dd>
            </dl>
            <dl>
                <dt>网站Logo：</dt>
                <dd>
                    <input type="text" class="inp_w250" name="logo" id="litpic"  value="" size="20"/>
                    <input type="button" class="btn_blue_b" id="BrowerPicture" value="选择站内图片">
                    <div style="display:inline-block; vertical-align:middle;">
                    <div id="doc_pic_up" data-toggle="upload" data-uploader="{:U('Attachment/uploadPlus',array('dir'=>'image'))}" 
                    data-file-size-limit="1024000000"
                    data-file-type-exts="*.jpg;*.png;*.gif;*.mpg"
                    data-multi="false"
                    data-on-upload-success="doc_upload_success"
                    data-icon="cloud-upload"
                    data-auto="true"></div>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>排列位置：</dt>
                <dd>
                    <input type="text" name="sort" size="30" value="1" data-rule="digits"/>
                </dd>
            </dl>
            <dl>
                <dt>网站简况：</dt>
                <dd>
                    <textarea name="description" class="tarea_default" cols="30" rows="5"></textarea>
                </dd>
            </dl>

            <dl>
                <dt>链接位置：</dt>
                <dd>
                    <input type="radio" name="ischeck" value="0" checked="checked"  />
                    首页
                &nbsp;&nbsp;
                    <input type="radio" name="ischeck" value="1" />
                    内页
                </dd>
            </dl>

        </form>
    </div>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">关闭</button>
        </li>
        <li>
            <button data-icon="save" class="btn btn-default" type="submit">保存</button>
        </li>
    </ul>
</div>